A computing device, such as a personal computer or other device, can be used to request content over a communication network from another computing device, such as a server. For example, a web page can be requested by a mobile phone and delivered to the phone by a web server via the Internet. In some instances, portions of the requested content may be requested multiple times by the same computing device, such as images, etc. Content providers can designate which objects responsive to a request may be cached in local memory for faster retrieval and processing in response to future requests, often avoiding subsequent requests for the content to the content provider.
When the Hypertext Transfer Protocol (HTTP) is used for communication between a client and server, headers are communicated with each object. The headers contain information about the source of the object, the type of the object, the time the object was transmitted, and the like. A content provider may also include cache control information in the headers. For example, the cache control information can include an indicator that the object may be cached, an expiration date or lifetime for the object, or an indicator that the object may not be cached. In many cases, there is no cache control information in the header, and the corresponding objects are typically treated as if they are not cacheable.
In addition to maintaining requested objects locally at a requesting computing device, at least some of the requested objects may be cached in shared caches at various computing devices utilized in facilitating data transfer between the requesting client computing device and the responding server. Common caching components include content delivery network (CDN) service providers and proxy servers that implement computing devices in a communication network that are configured to facilitate and improve the delivery of content on behalf of content providers. In addition, content may be cached at both the content provider and requesting client.
When a resource is cached at a shared cache, subsequent requests for the resource can be responded to with the cached resource, thereby avoiding a potentially inefficient request to the content provider for the resource. If a client has cached the resource locally, subsequent requests from the client may be fulfilled from the local cache. Prior to retrieving content from a cache, whether shared or local, a request for information regarding whether the resource has changed in the time since it was cached may be made to the content provider. Such a request may be known as an “if-modified-since” request. If the object has been modified, the “if-modified-since” request can be responded to with the modified object; otherwise, the request can be responded to with data indicating that the object has not been modified since it was cached.